package cn.topevery.garden.entity.po;

import cn.topevery.garden.entity.serializer.GeometrySerializer;
import cn.topevery.garden.framework.base.BaseEntity;
import com.alibaba.fastjson.annotation.JSONField;
import hw.topevery.framework.annotation.DbTable;
import hw.topevery.framework.annotation.DbTableField;
import hw.topevery.framework.enums.DbTypeEnum;
import lombok.Data;
import org.locationtech.jts.geom.Geometry;

import java.time.LocalDate;
import java.util.List;

/**
 * 
 *
 * @author code-generate
 * @date 2022-01-05
 */
@Data
@DbTable(tableName = "t_park_component")
public class ParkComponent extends BaseEntity {
        /**
     * 编号
     */
    @DbTableField(columnName = "c_code", dbType = DbTypeEnum.VARCHAR)
    public String code ;

    /**
     * 名称
     */
    @DbTableField(columnName = "c_name", dbType = DbTypeEnum.VARCHAR)
    public String name ;

    /**
     * 类型:gs1:绿地护栏,
     */
    @DbTableField(columnName = "c_component_type", dbType = DbTypeEnum.VARCHAR)
    public String componentType ;

    /**
     * 面积(平方米）
     */
    @DbTableField(columnName = "c_measure", dbType = DbTypeEnum.DOUBLE)
    public Double measure ;

    /**
     * 公园类型
     */
    @DbTableField(columnName = "c_type", dbType = DbTypeEnum.VARCHAR)
    public String type ;

    /**
     * 地点描述
     */
    @DbTableField(columnName = "c_address", dbType = DbTypeEnum.VARCHAR)
    public String address ;

    /**
     * 计算空间数据
     */
    @DbTableField(columnName = "c_geo_wkt", dbType = DbTypeEnum.VARCHAR)
    public String geoWkt ;

    /**
     * 区域Id
     */
    @DbTableField(columnName = "c_distract_id", dbType = DbTypeEnum.VARCHAR)
    public String distractId ;

    /**
     * 区域
     */
    @DbTableField(columnName = "c_distract_name", dbType = DbTypeEnum.VARCHAR)
    public String distractName ;

    /**
     * 街道Id
     */
    @DbTableField(columnName = "c_street_id", dbType = DbTypeEnum.VARCHAR)
    public String streetId ;

    /**
     * 街道名称
     */
    @DbTableField(columnName = "c_street_name", dbType = DbTypeEnum.VARCHAR)
    public String streetName ;

    /**
     * 街道Id
     */
    @DbTableField(columnName = "c_community_id", dbType = DbTypeEnum.VARCHAR)
    public String communityId ;

    /**
     * 街道名称
     */
    @DbTableField(columnName = "c_community_name", dbType = DbTypeEnum.VARCHAR)
    public String communityName ;

    /**
     * 图片地址
     */
    @DbTableField(columnName = "c_file_url", dbType = DbTypeEnum.VARCHAR)
    public String fileUrl ;

    /**
     * 管理单位
     */
    @DbTableField(columnName = "c_management", dbType = DbTypeEnum.VARCHAR)
    public String management ;

    /**
     * 建设时间
     */
    @DbTableField(columnName = "c_date", dbType = DbTypeEnum.DATE)
    public LocalDate date ;

    /**
     * 百度经度
     */
    @DbTableField(columnName = "c_baidu_x", dbType = DbTypeEnum.DOUBLE)
    public Double baiduX ;

    /**
     * 百度维度
     */
    @DbTableField(columnName = "c_baidu_y", dbType = DbTypeEnum.DOUBLE)
    public Double baiduY ;

    /**
     * 图层名称
     */
    @DbTableField(columnName = "c_obj_name", dbType = DbTypeEnum.VARCHAR)
    public String objName ;

    /**
     * 材质
     */
    @DbTableField(columnName = "c_material", dbType = DbTypeEnum.VARCHAR)
    public String material ;

    /**
     * 备注
     */
    @DbTableField(columnName = "c_note", dbType = DbTypeEnum.VARCHAR)
    public String note ;

    private List<GreFile> fileList;

    /**
     * 范围
     */
    @DbTableField(columnName = "c_map_ranges", dbType = DbTypeEnum.OTHER)
    @JSONField(serializeUsing = GeometrySerializer.class, deserializeUsing = GeometrySerializer.class)
    public Geometry mapRanges ;

}
